package com.roncoo.course.controller;


import com.roncoo.course.entity.HomePrecinct;
import com.roncoo.course.service.HomePrecinctService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wdf
 * @since 2021-03-26
 */
@RestController
@Api(tags = "(homePrecinct)")
@RequestMapping("/homePrecinct")
public class HomePrecinctController {
    @Resource
    private HomePrecinctService homePrecinctService;

    @ApiOperation(value = "查询所有")
    @PostMapping("findAll")
    public List<HomePrecinct> findAll(){
        return homePrecinctService.find();
    }
}

